AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:Initialize()
	self.BaseClass.Initialize(self)
	self.Ore = 0
	if not (WireAddon == nil) then
		self.WireDebugName = self.PrintName
		self.Outputs = Wire_CreateOutputs(self.Entity, { "Ore", "Max Ore" })
	end
end

function ENT:TriggerInput(iname, value)
end

function ENT:Think()
	self.BaseClass.Think(self)
	if not (WireAddon == nil) then
		self:UpdateWireOutput()
	end
	self.Entity:NextThink(CurTime() + 1)
	return true
end

function ENT:UpdateWireOutput()
	local Ore = self:GetResourceAmount("Ore")
	local maxOre = self:GetNetworkCapacity("Ore")
	Wire_TriggerOutput(self.Entity, "Ore", Ore)
	Wire_TriggerOutput(self.Entity, "Max Ore", maxOre)
end
